﻿using System;
using System.Collections.Generic;

namespace ZD_DataModel
{
    /// <summary>
    /// 数据库字段与实体类属性映射关系自定义特性类
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
    public class ZD_ColumnMappingAttribute : Attribute
    {
        public ZD_ColumnMappingAttribute(string ColumnName, IDataModel ReferenceTableName)
        {
            this.ColumnName = ColumnName;
            this.ReferenceTableName = ReferenceTableName;
        }

        /// <summary>
        /// 字段名
        /// </summary>
        public string ColumnName { get; set; }

        /// <summary>
        /// 关联表名
        /// </summary>
        public IDataModel ReferenceTableName { get; set; }
    }
}
